Printer self-diagnosis device

ABSTRACT

A self-diagnosis device provided in a printer that detects more than one error among a plurality of functional mechanisms provided in the printer, with one process. Test devices are provided for testing the functional mechanisms, and a control unit operates the test devices to detect an error, even if errors have been detected in other functional mechanisms.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a self-diagnosis device for the printerby which a condition of functional devices provided in the printer isautomatically diagnosed by a built-in microcomputer.

2. Description of the Related Art

A printer now used for printing the output from a host computer isprovided with a built-in microcomputer for controlling the functions ofthe printer, but recent increases in the number of functions of theprinter have led to a corresponding increase in the number of functionalmechanisms provided for carrying out these functions, and thus, when afault occurs in the printer, it is difficult to pinpoint the cause ofthe fault.

Accordingly, some current printers are provided with a self-diagnosisfunction by which, when a power supply is turned ON, each functionalmechanism is pre-tested, and an error warning is displayed if a fault isdetected by these tests.

In a conventional self-diagnosis device of a printer, however, even if aplurality of functional mechanisms are to be tested, when an error isdetected in a pre-test, tests of the remaining functional mechanisms arenot carried out. Namely, the self-diagnosis process is stopped and theself-diagnosis device outputs an error warning. Therefore, if more thanone of the functional mechanisms in the printer has a fault, only one ofthese faulty mechanisms is detected by the single diagnosis process.

Accordingly, when a plurality of errors exist in the printer, the powersupply must be turned ON again each time an error is to be found andcorrected, which is time-wasting and cumbersome.

SUMMARY OF THE INVENTION

Therefore, an object of the present invention is to provide aself-diagnosis device in which a plurality of errors occurring in aprinter are detected by one self-diagnosis process.

According to the present invention, there is provided a self-diagnosisdevice comprising a plurality of functional mechanisms provided in aprinter, a means for testing a condition of the functional mechanisms, ameans for detecting a test result obtained by the testing means, a meansfor controlling the testing means to carry out a test of each of thefunctional mechanisms, and a means for storing a test result for eachfunctional mechanisms. Each of the functional mechanisms carries out apredetermined function for the printer, respectively, and thecontrolling means operates the testing means to carry out a test forpredetermined functional mechanisms regardless of the result of tests ofthe other functional mechanisms.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention will be better understood from the description ofthe preferred embodiments of the invention set forth below, togetherwith the accompanying drawings, in which:

FIG. 1 is a side view of a laser printer to which an embodiment of thepresent invention is applied;

FIG. 2 is a plane view of a form feeding unit of the embodiment of FIG.1;

FIG. 3 is a sectional view of a part near a backing roller (BR) motor;

FIG. 4 is a plane view of a disk for generating a paper feed sensor(PFS) pulse;

FIG. 5 (A) is a plane view of a disk constructing a backup roller up(BRU) sensor;

FIG. 5 (B) is a plane view of a disk constructing a backup roller down(BRD) sensor;

FIG. 6 is a block diagram of a control system for the printer of theembodiment of the present invention;

FIGS. 7a, 7b, 8a, 8b, 8c, 9a, 9b, 9c, 10a, and 10b illustrate a flowchart of a main routine;

FIG. 11 is a flow chart of a press roller down routine;

FIGS. 12a and 12b illustrate a flow chart of a main motor drivingroutine;

FIG. 13 is a flow chart of a form setting routine;

FIG. 14 is a flow chart of an emergency stop routine;

FIG. 15 is a flow chart of a main motor stopping routine;

FIGS. 16a and 16b illustrate a flow chart of a self-test routine;

FIGS. 17a and 17b are jointly a flow chart of a stopping processroutine;

FIGS. 18a and 18b illustrate a flow chart of a timer interrupt routine;

FIGS. 19a and 19b illustrate a flow chart of a PFS interrupt routine;

FIG. 20 is a timing chart of a part of a control of the printer of theembodiment of the present invention;

FIG. 21 is a block diagram of a timer; and

FIG. 22 is a diagram of showing a relationship between PFS pulses andHSYNC pulses.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The present invention will now be described with reference toembodiments shown in the drawings.

FIGS. 1 through 5 show an embodiment of a device for feeding acontinuous form provided in a laser beam printer, in which thecontinuous form is printed in accordance with print data input from ahost computer, by an electrophotographing process including an exposureto a photosensitive drum, developing the exposed image, and a transferand a fixing thereof on a page of the continuous form. Note that,although this printer is similar to a conventional dot matrix type lineprinter which starts a printing process by accumulating printing datafor one line, since this description is concerned with use of acontinuous form, and as the printing is carried out by theelectrophotographing process as described above, this printer isconstructed as a page printer which starts printing after accumulatingprint data corresponding to one full page of printing.

The mechanical construction of the printer is described below withreference to FIG. 1 through 5.

From an inlet mouth 1 through which a continuous form FP is supplied, toan outlet mouth 2 through which a printed form is discharged, theprinter is provided with a transfer unit 10 centered around aphotosensitive drum 11, a tractor unit 20 including endless belts 21having projections engaging with sprocket holes of a continuous form FP,and a fixing unit 30 including a pair of rollers 31 and 32 forthermofixing a toner image transferred to the form, in that order.

The transfer unit 10 includes a charger 12 for charging a photosensitivematerial on the sensitive drum 11 with electricity, a scanning opticalsystem 13 for exposing the charged sensitive material to form anelectrostatic latent image on the drum 11, a developing unit 14 forapplying a toner to the formed latent image, an electrical dischargeunit 15 for charging the continuous form FP to transfer the toner imagethereto, a cleaning brush 16 for removing toner remaining on the drum11, and an LED 17 for exposing the whole surface of the drum 11 toradiation to remove residual electric charges from the drum 11.

The scanning system 13 is disposed in an upper cover 19 of the printer.In the scanning system 13, a modulated beam from a semiconductor laser(not shown) is continuously deflected by a polygon mirror 13a, and isconverged by an f θ lens 13b. The converged beam is reflected by a beambender 13c to form a scanning line on the sensitive drum 11, whichrotates so that an electrostatic latent image is formed on thephotosensitive drum 11 in the form of dots.

The electrical discharge unit 15 is fixed to an arm 15a which is rotatedabout a pivot L1 by a cam mechanism described later. A paper pressingroller 18 is connected to the arm 15a, at an opposite end thereof to theelectrical discharge unit 15, and the continuous form FP is passedbetween the paper pressing roller 18 and the end portion of the arm 15a.The arm 15a is also provided with a cam follower 15b.

When using the continuous form FP, if the entire transferred partthereof is fixed, a part of the continuous form FP between the transferposition and the fixing position is left blank and discharged at thestart of the next printing process, and thus is useless. Therefore, whenthe printing process is temporarily stopped, a problem arises of whatpart of the transferred continuous form FP should be fixed. Further,taking into consideration the printing performance of the printer, aninterruption and a restart of the transfer and fixing process arepreferably carried out at the perforated portion of the continuous formFP at which the forms are separated from each other. Accordingly, theprinter of this embodiment is constructed in such a manner that a spacebetween the transfer position and the fixing position corresponds to onepage of the continuous form FP, and when the printing is stopped, aperforated portion thereof, which is a boundary between two adjacentpages, is at the transfer position or the fixing position.

When the printing is restarted, the drum 11 must be allowed to run idle,so that the continuous form FP is not fed, until an exposure part of thedrum reaches the transfer position of the continuous form FP. Note that,if the drum 11 is rotated while the continuous form FP and the drum 11are in contact with each other, the life of the drum 11 is shortened dueto an abrasion of the sensitive material thereon, and the continuousform FP is stained by a residual toner. Therefore, to avoid theseproblems, the printer is constructed in such a manner that, when thedrum 11 is running idle, the arm 15a is depressed so that the paperpressing roller 18 depresses an upper surface of the continuous form FP,to separate the continuous form FP from the sensitive drum 11.

As shown in FIG. 2, the tractor unit 20 is constructed in such a mannerthat two endless belts 21, 21 wound between driven shaft 22 and driveshaft 23 are driven by a main motor 40 through a feed clutch (referredto as the F clutch hereinafter) and a gear train provided in a box 41. Agear train provided between the main motor 40 and the drive shaft 23 ofthe tractor unit 20 includes a one-way clutch, so that the continuousform FP is fed at 50 mm/s by only the tractor unit 20. If the form isforcibly moved by, for example, pulling, at a speed higher than 50 mm/s,the one-way clutch runs idle due to a resistance engendered by thishigher speed.

A disk 25 is connected to the driven shaft 22 through a chain 24 androtates in association with the driven shaft 22. As shown in FIG. 4, thedisk 25 is provided with slits 25a at predetermined intervals. Aphotocoupler 26 is mounted so that it sandwiches a part of the disk 25,and outputs pulse signals when the slits 25a pass through thephotocoupler 26, in accordance with the amount fed of the continuousform FP. Hereinafter, this photocoupler is referred to as the PFS (paperfeed sensor), and the output pulse is referred to as a PFS pulse. Notethat one PFS pulse is output upon the feeding of each 1/2 inch of thecontinuous form. A pulse signal obtained from one of the slits 25acorresponds to a sprocket hole provided in the continuous form FP, and asignal obtained by a part other than the slits 25a corresponds to a partother than the sprocket holes.

The fixing unit 30 is provided with an upper heat roller 31 and a lowerpress roller 32. The heat roller 31 includes a halogen lamp for heatingand a thermistor for sensing a temperature. The press roller 32 isprovided for pressing the continuous form FP passing through the rollers31 and 32 against the heat roller 31 with a predetermined pressure. Theheat roller 31 is rotated by the main motor 40 through the F clutch anda gear train, and feeds the continuous form FP at a speed of 75 mm/sbetween the rollers 31 and 32. Therefore, the actual feeding of thecontinuous form FP is carried out by the fixing unit 30, and the tractorunit 20 acts to impose a rearward tension to the continuous form FP, toprevent a skewing thereof.

The printer is provided with three kinds of sensors along a feedingpassage of the continuous form FP, to sense whether or not thecontinuous form FP is present in the feeding passage.

First, an empty sensor 50 is provided between the inlet mouth 1 and thetransfer unit 10. In this printer, perforated portions, which areboundaries between two adjacent pages, are positioned immediately belowthe sensitive drum 11 of the transfer unit 10 and at the fixing rollers31 and 32, respectively, when a printing process is stopped. Therefore,when the continuous form ends at that page, the printer senses the endof continuous form through a signal output by the empty sensor 50.

Second, skew sensors 51 and 51 are provided between the fixing unit 30and the tractor unit 20 and in contact with the edges of the continuousform FP, to thereby sense a skewing and breaking of the continuous formFP. These skew sensors output a signal when at least one of the edges ofthe continuous form FP has risen.

Third, a tip sensor 52 is provided between the two skew sensors 51 and51. This tip sensor 52 senses a tip portion of the continuous form FPwhen a positioning of the continuous form FP is carried out.

As it takes time to heat the heat roller 31 from a room temperature to atemperature necessary for the fixing, the heat roller 31 is heated whilewaiting for the start of a next printing operation. Note that, since thecontinuous form FP is used in this printer, if the continuous form FP isalways in contact with the heat roller 31, burning or blistering of thepaper may occur. Therefore, the press roller 32 facing the heat roller31 is constructed to be able to move up and down, so that the pressroller 32 can be moved down and thus separated from the continuous formFP when waiting for the start of a next printing operation.

Both ends of the press roller 32 are supported by arms 33 rotatablyfixed to the chassis of the printer through a pivot L2. The arms 33 areconnected to a lever 34 by a tension spring 35, and the lever 34 isrotatably fixed to the chassis of the printer through the pivot L2,similar to the arms 33. The lever 34 is provided with a cam follower 34aat a tip portion thereof, and this cam follower 34a engages with a cam36 and is swung up and down by a rotation of the cam 36, so that thelever 34 and arms 33 move up and down to move the press roller 32 up anddown. The downward movement of the press roller 32 is generated by thedeadweight thereof.

Note that the up and down movements of the press roller 32 and the upand down movements of the electrical discharge unit 15 are carried outby the same driving means, as described below.

The drive source is a backup roller motor (referred to as a BR motorhereinafter) 60 provided under the feeding passage of the continuousform FP as shown in FIG. 3. A gear 62 driven by the BR motor 60 througha reduction mechanism 61 meshes with a gear 64 connected to the shaft 63to which the cam 36 is fixed at one portion thereof, and meshes with agear 67 connected to a shaft 66 to which a lever 65 moving theelectrical discharge unit 15 up and down is fixed at another portionthereof.

The lever 65 is connected to a slide plate 68 which is slidable relativeto the chassis of the printer. The slide plate 68 is urged to the leftin the drawing by a tension spring 69. When the slide plate 68 is slidto move against a spring force of the tension spring 69, a plate cam 68aprovided at the end of the slide plate 68 comes into contact with thecam follower 15b, to move the electrical discharge unit 15 down.

Two disks 70 and 71 are fixed to the shaft 63 to rotate as one body. Theoutside disk 70 is provided with a small slit 70a and a large slit 70b,as shown in FIG. 5 (A), and the inside disk 70b is provided with a slit71a, as shown in FIG. 5 (B). Disks 70 and 71 are disposed in such amanner that parts of the disks are positioned at gaps in thephotocouplers 72 and 73, respectively. The disks 70 and 71 and thephotocouplers 72 and 73 together construct sensors for sensing aposition of the press roller 32. Note that, in the followingdescription, a BRU (backup roller up) signal is output from thephotocoupler 72, and a BRD (backup roller down) signal is output fromthe photocoupler 73.

The press roller 32 is positioned at a down position except when aprinting process is carried out, whereby an unnecessary contact thereofwith the continuous form FP is completely avoided. Therefore, as shownin a flow chart described later, when the printer is stopped due to theoccurrence of errors, the press roller 32 is always retracted; i.e.,moved down.

FIG. 6 shows a control circuit of the printer. This circuit is providedwith an A-IC CPU which carries out a control of the printing process,and a B-IC CPU which carries out error detections. A remote interfacefor a remote control for external devices, and a power supply sensing ICfor checking a supply of power to both CPUs, are connected to the CPUs.

The A-IC is connected to an interface for a controller receivingprinting information from the host computer. Further, the A-IC isconnected to controlled objects such as a polygon scanner for rotatingthe polygon mirror 13a of the scanning system, the LED 17 provided atthe transfer unit 10, a high voltage circuit connected to, for example,the charger 12, to which a bias voltage is supplied, the main motor 40,the F clutch, the BR motor 60, and the halogen lamp provided in the heatroller 31.

Information is inputted to the A-IC by a BD sensor, which outputs ahorizontal synchronizing signal of the scanning optical system, a BRUsensor and a BRD sensor for sensing a position of the press roller 32, athermistor for sensing a temperature of the heat roller, an upper coversensor for sensing an open and closed state of the upper cover, and thePFS sensor.

The BD sensor is a photodetector which is optically equivalent to thephotosensitive drum 11 in the scanning system, and is provided upstreamof the sensing drum 11 along the scanning direction of the beam. Note,that such a photodetector is usually called a BD sensor, and thus thisterminology is used in this specification. Further, an output signalfrom this sensor is called a BD signal.

A laser driver driving a semiconductor laser of the scanning system andan E² PROM, storing information on wear of the parts of the printer areconnected to the B-IC. A pattern generator storing printing informationfor a self-printing test is connected to the laser driver. Thesemiconductor laser is provided with a detector receiving a beamreturned to the side opposite to that from which the beam is radiatedfor printing, so that the laser driver can carry out an automatic powercontrol (APC) by a feedback control to the semiconductor laser inaccordance with signal output from the laser driver.

Information is inputted to the B-IC by the empty sensor 50, the skewsensor 51 and the tip sensor 52, as sensors relating to the formfeeding, and by a toner overflow sensor showing the amount of toner usedand a toner low sensor warning of a lack of toner, as sensors related toa toner in the transfer unit 10.

The A-IC and the B-IC are constructed in such a manner that the inputand output of information between the A-IC and the B-IC are carried outthrough a plurarity of signal lines, to control the printer. FIG. 6shows the main parts of these signal lines.

The signals transmitted from the B-IC to the A-IC include a B-IC RDYsignal showing that the B-IC is ready, a STOP signal for immediatelystopping an operation of each part, even during the printing process,when a very serious error occurs, a PAUSE signal for stopping anoperation of each part after a predetermined operation when a lessserious error occurs, a form setting request signal output when the tipof the continuous form does not reach the tip sensor, and an FF (formfeed) request signal for carrying out a discharge of one page of thecontinuous form FP.

The signals transmitted from the A-IC to the B-IC include error signalsfor the BR motor, the scanning optical system, and the heater in thefixing unit. The B-IC analyses an error sensed by the B-IC and an errorsignal transmitted from the A-IC to judge the seriousness of the errorbased on predetermined criteria, and then selects the STOP signal or thePAUSE signal in accordance with the seriousness of the error andtransmits the signal to the A-IC. Less serious errors are those forwhich signals indicating a toner overflow warning, a toner low warning,and an end of the continuous form warning are input, and all othererrors are dealt with as very serious.

The operations of the printer are described below with reference to theflow charts shown in FIGS. 7 through 19, which are mainly programs ofthe A-IC.

FIGS. 7 through 10 show a main flow chart of a basic operation of theprinter, and other routines are branched off from the main routine shownin the main flow chart, or are carried out when required in the mainroutine.

Note that the supply of each bias voltage for charging, developing,transfer, and cleaning is shown as an M bias, D bias, T bias, and Cbias, respectively, in the flow chart. When a bias voltage for startingthe printer is supplied, the M bias, D bias, T bias, and C bias aresequentially supplied at a predetermined timing in synchronization witha rotation of the sensitive drum 11.

When a power supply is activated, the A-IC initializes the registers inSTEP 001, and starts a control timer in STEP 002. The control timer isused in an interrupt routine described later, or used for defining awidth of a drive pulse of the main motor 40.

Note that two kind of clocks for 1.2 μs and 38.4 μs can be used in theA-IC, and when a correction of the feeding of the continuous form is notallowed, as described later, the control timer counts a clock signal of38.4 μs for 26 times to define 1 ms with a relatively low accuracy. Theclock count of 38.4 μs is started in STEP 002.

Then, in STEP 003, the A-IC determines whether or not a remotecontroller is connected and in STEP 004, whether or not the upper coveris open. If the remote controller is connected, the process goes to aremote routine, and if the upper cover is open, the process goes to acover open routine.

If the remote controller is not connected and the upper cover is notopen, the process goes to STEP 005, in which a state of the BRU issensed. If the BRU signal is an ON signal, i.e., if the press roller 32is in the up position, a press roller down routine shown in FIG. 11 isrequested in STEP 006, and the press roller 32 is moved down. This statemay occur when the power supply is cut during a printing process so thatthe press roller is left at the up position. The process for moving thepress roller down is carried out to prevent a burning of the continuousform when the heater is turned ON at the start of the next printingprocess.

In the press roller down routine shown in FIG. 11, in STEP 150 the BRmotor is driven in a direction in which the press roller 32 is moveddown, and in STEP 151, a 2 second timer is started. Before the operationof the 2 second timer is completed, it is determined in STEP 152 and 153whether or not the BRD signal has become an ON signal. If the BRD signalhas not become an ON signal within 2 seconds, the process goes to anerror processing routine. Conversely, if the BRD signal has become an ONsignal within 2 seconds, the process goes to STEP 154 in which the BRmotor is stopped, and then goes to STEP 155 in which the timer isstopped, and the process returns to STEP 007 in FIG. 7. Note that, inthe error processing routine, the kind of error that has occurred isindicated, and the power supplies for the motor and heater are turnedOFF, whereby the operation of the printer is stopped.

Then, in STEPS 007 and 008 in FIG. 7, it is determined whether or not atest switch of the printer is turned ON, and if the test switch isturned ON, a test mode is set so that the B-IC ignores all errorinformation except for that relevant to a form feeding for the test.

In STEPS 009 through 011, it is twice determined, at STEP 009 and atSTEP 011, whether or not the B-IC is ready (B-IC RDY), with an intervalof 100 ms therebetween imposed in STEP 010. If the B-IC is not ready,the process returns to STEP 004, and STEPS 004 through 011 are repeateduntil the B-IC is ready. If the B-IC is ready, the process goes to STEP012. In STEPS 012 and 013, it is determined whether or not a STOP orPAUSE signal has been input from the B-IC. If the STOP or PAUSE signalhas been input to the A-IC, the process returns to STEP 004, and STEPS004 through 013 are repeated until it is determined that the STOP orPAUSE signal has not been input.

In STEP 014, it is determined whether or not a signal requesting thecontinuous form to be set has been output from the B-IC. This signal isoutput when the tip of the continuous form does not reach the tip sensor52. When the continuous form is requested to be set, the processbranches off from STEP 014 to go to a form setting routine shown in FIG.12.

In the form setting routine shown in FIG. 12, the press roller downroutine shown in FIG. 11 is carried out in STEP 160, and a main motorstart routine is requested in STEP 161.

In the main motor start routine as shown in FIG. 13, a power supply isswitched ON in STEP 200, and a motor ON bit is set to "1" and a Pcounter is set to "159" in STEP 201. Then an initial value is set to aVALUE counter in STEP 202. The P counter is used in a timer interruptroutine described later to set data for starting the motor so that arotation of the main motor 40 is accelerated from a slow speed to a highspeed. The VALUE counter is a counter to which data corresponding to afrequency of the actual drive pulse when starting the main motor 40 isset. An acceleration process of the main motor 40 is described laterwith reference to FIG. 18 showing the timer interrupt routine.

In STEP 203, phase data of a drive pulse for the main motor is output inaccordance with data set in the VALUE counter. The control timer isstopped in STEP 204, and then timer data set in the timer interruptroutine is input in STEP 205, and the control timer is started againwith the set value in STEP 206. Finally, the C bias is turned ON in STEP207, and the process then returns to a step at which the main motorstart routine is carried out, i.e., in this case, STEP 162 shown in FIG.12.

If it is determined in STEP 162 that a rotation of the main motor hasreached a predetermined value, a motor RDY bit is set to "1" in STEP 163and then the F clutch is connected in STEP 164, so that the heat roller31 and the tractor unit 20 are rotated and the feeding of the continuousform FP is started.

Then, in STEPS 165 through 169, the process waits until the form is fedby 5 PFS pulses from an input of a signal by the tip sensor 52. Namely,if it is determined that the tip sensor 52 has sensed the tip positionof the continuous form in STEP 165, a PFS count is set to "00H" in STEP167, and it is determined whether or not the PFS count has reached "05H"in STEP 168. If it is determined that the PFS count has reached "05H" inSTEP 168, the process goes to STEP 170. Accordingly, when the form isfed by 5 pulses, i.e., 2.5 inches, after a signal has been input fromthe tip sensor 52, the tip portion of the continuous form is engagedwith the rollers of the fixing unit 30, and a perforated portion, whichis a boundary between two adjacent pages, is positioned immediatelyunder the sensitive drum 11. Note that the PFS count is carried out in aPFS interrupt routine described later.

In STEPS 165 through 169, it is also determined whether or not a STOPsignal has been output by the B-IC, and if the STOP signal is outputbefore the continuous form is fed by 5 pulses after sensing the tipposition of the continuous form, the process goes to an emergency stoproutine shown in FIG. 14.

In the emergency stop routine shown in FIG. 14, in STEP 220, the controltimer is stopped so that the timer interrupt is prohibited, and afterthe press roller down routine shown in FIG. 11 is carried out in STEP221, an output of the semiconductor laser is stopped in STEP 222. Then,in STEP 223, the heater in the heat roller 31 is turned OFF, and thebias voltages for the F clutch and the transfer unit 10 are shut off,respectively, and in STEP 224, the print mode is released and theprinting process is ended.

Note that the emergency stop routine is carried out in accordance with aSTOP signal input from the B-IC, and is different from the errorprocessing routine carried out in accordance with a judgement of theA-IC. The emergency stop is carried out in a case in which the printercan be restarted after attending to, for example, insertion of a freshcontinuous form, or clearing a form jam. Conversely, the errorprocessing routine is carried out when the printer is subject to seriousdamage, such as breakdown of a heater or a motor, and must be returnedto the maker for repair.

Returning to FIG. 12, if a STOP signal is not input during the sensingof 5 pulses by the PFS, the process goes to STEP 170 in which the Fclutch is shut off.

At this time, due to the process carried out in STEPS 165 through 170,the tip portion of the continuous form is positioned at the rollers ofthe fixing unit 10. Therefore, when a printing is started, the form issandwiched between the rollers, and the feeding of the continuous formFP is started. As described above, the heat roller 31 is kept at a hightemperature while waiting for a next printing operation to start, andaccordingly, if the end portion of the continuous form is positionednear the heat roller, if the form is not gripped by the rollers the endportion of the form is curled by heat from the heater, and as a result,when the press roller 32 is moved up to start a feeding of thecontinuous form, the tip of the continuous form is not properly fedbetween the rollers, and thus a paper jam occurs.

To avoid such a problem, in this printer, one page of the continuousform is discharged from the printer by a process carried out in STEPS171 through 184 described below.

First, the press roller 32 is moved up to sandwich the form togetherwith the heat roller 31 in STEPS 171 through 179.

In this process, the BR motor is rotated in a direction in which thepress roller 32 is moved up in STEP 171, and a 2 second timer is startedin STEP 172. Then, before the operation of the 2 second timer iscompleted, it is determined whether or not the press roller 32 is set toa predetermined position. Then, in STEP 173, it is determined whether ornot a first BRU signal has been output, i.e., whether or not the firstslit 70a (FIG. 5(A)) is at the photocoupler 72. If the first BRU signalhas been output, the process goes to STEP 174, which is repeated for 2second. If the BRU signal disappears during this 2 seconds period, theprocess goes to STEP 176, in which it is determined whether or not asecond BRU signal has been outputted. The second BRU signal correspondsto the second slit 70b (FIG. 5(A)), and an output of the second BRUsignal means that the press roller 32 has been moved up to thepredetermined position thereof.

If the BRU signal is not changed during the 2 seconds period in STEPS174 and 176, it is determined that the BR motor has failed, and theerror processing routine is carried out.

If the press roller 32 is moved up during the 2 second period, the BRmotor is stopped in STEP 178, and the 2 second timer is stopped in STEP179. Then, a process by which one page of the continous form isdischarged is carried out as described below.

In STEPS 180 and 181, a counter counting the PFS is cleared, and the Fclutch is connected to start the feeding of the continuous form. Thisprinter is constructed in such a manner that the continuous form is fedby one page having a length of 11 inches. Note, the number of PFS pulsescorresponding to one page is 22.

Accordingly, while it is determined whether or not the STOP signal hasbeen output from the B-IC, in STEP 183, it is also determined whether ornot the PFS pulses have been sensed 22 times in STEP 182. If 22 PFSpulses have been sensed, the F clutch is disconnected in STEP 184 tostop the feeding of the continuous form. By this process, the first pageof the continuous form is discharged from the outlet of the printer,whereby a boundary between the first page and the second page ispositioned at the fixing unit 30, and a boundary between the second pageand the third page is positioned immediately under the sensitive drum11.

In STEP 185, the process waits until the T bias is turned OFF, and whenthe T bias is turned OFF, a main motor stop routine is carried out inSTEP 186 to stop the main motor. Then the press roller is moved down inSTEP 187, so that a pressure on the continuous form exerted by the heatroller is released, and the process then goes to STEP 004 in FIG. 7.

The main motor stop routine is carried out as shown in FIG. 15. That is,in STEPS 230 and 231, a motor ON bit and a motor RDY bit are cleared to"0", respectively, and phase data for driving the motor is cancelled inSTEP 232. Then a power supply for the motor is turned OFF in STEP 233,and the C bias is turned OFF in STEP 234, and the process returns to theroutine at which this main motor stop routine was requested.

Returning to FIG. 7, the main routine is again described below.

When, as a result of carrying out the continuous form setting routine, arequest for the form to be set is not received at STEP 014, the selftest routine is carried out in STEP 015. In this routine, if an error isdetected, the process branches off from STEP 016 to the error processingroutine. Note that this self test process is the subject of the presentinvention.

In the printer of this embodiment, even if an error is detected, all ofthe remaining check items are checked, and thus a plurality of errorscan be detected by this error processing routine.

As shown in FIG. 16, in the self test routine, it is determined whetheror not a resistance of the thermistor in the heat roller is higher thana resistance RO corresponding to an assumed lowest room temperture (forexample, 0° C.). A resistance value of a thermistor becomes larger inaccordance with a lowering of a temperature, and therefore, if theresistance value of the thermistor is higher than the resistance ROcorresponding to the assumed lowest room temperature, the A-ICdetermines that the thermistor is disconnected, a heater error bit isset to "1" in STEP 241, and the process goes to the next test.

If it is not determined that the thermistor is disconnected, a 120second timer is started in STEP 242, and the heater is turned ON in STEP243. In STEP 244, it is determined whether or not the resistance of thethermistor is lower than a resistance value RL corresponding to a lowersetting temperature (for example, 100° C.).

When a power supply to a printer is ON, in principle, the heater isheated as a preheating step. In the printer of this embodiment, theheating temperature is controlled in two steps. Namely, as describedlater, when a printing process is not carried out for more than 6minutes, although the power supply is turned ON, the heating temperatureis set to a lower temperature of 100° C., and when a printing process isstarted, the heating temperature is set to a higher temperature of 185°C. Accordingly, an influence of heat on the continuous form in theprinter is avoided

When a temperature of the heat roller is lower than the lower settingtemperature, in STEP 245, the temperature of the heat roller is set tothe lower temperature, and in STEP 246, it is determined whether or not120 seconds has passed, whereby the determination at STEP 244 isrepeated for at least 120 seconds. If the temperature of the heat rollerbecomes higher than the lower temperature, within 120 seconds, atemperature set to the heat roller is changed to a higher temperature inSTEP 247, and the next test is carried out. If the temperature of theheat roller does not become higher than the lower temperature after 120seconds have passed, it is determined that the heater has failed and theprocess goes to STEP 241.

Note that the temperature of the heat roller is not immediately set tothe higher temperature because, if the temperature of the heater is setto the higher temperature immediately after the heater is turned ON, thetemperature of the heater will rise to an excessively high level and thefixing unit will be damaged.

If a series of heater tests is finished without the occurrence oferrors, a subroutine of a BR motor test is requested in STEP 248. Inthis subroutine, while sensing the output of BRU and BRD signals, it isdetermined whether or not the press roller can be moved up and downwithin 2 seconds.

If an error is detected as a result of the tests, including the testdescribed later, an error bit corresponding to each test is set, andthen the process returns to the test routine and the next test iscarried out.

The main motor is started in STEP 249, and after it is determined that amotor RDY signal is output in STEP 250, a motor RDY bit is set in STEP251. In STEP 252, a test of the polygon scanner is begun, and a 6seconds timer is started. In this test, it is determined whether or nota rotation speed of the polygon mirror has reached a predetermined valuewithin 6 seconds from the start of the rotation thereof.

Then, in STEP 253, it is determined whether or not the automatic powercontrol (APC) to the semiconductor laser is operating correctly. In thistest, a signal output from a D/A converter provided in the laser driveris changed with regard to the least significant bit, whereby it isdetermined whether or not an output signal of a return beam has changedin accordance with a change of the least significant bit. If the outputof the laser has changed in accordance with the output control of theA/D converter, it is determined that the APC for the semiconductor laseris operating correctly.

In STEP 254, an initialization of a pattern generator used in aself-printing process is started, and in STEPS 255 and 256, it isdetermined whether or not a rotation speed of the polygon mirror hasreached a predetermined value within 6 seconds, by the above-mentionedpolygon scanner test. If the rotation speed has not reached thepredetermined value within 6 seconds, the process goes to STEP 257, inwhich a polygon scanner error bit is set, and then goes to STEP 261.Conversely, if the rotation speed of the polygon mirror has reached thepredetermined value within 6 seconds, the timer is stopped in STEP 258,and in STEP 259, it is determined wheter or not an error has occurred atthe APC. If the APC is operating correctly, a test of a BD sensor iscarried out in STEP 260, and the process then goes to STEP 261.Conversely, if an APC error has occurred, STEP 260 is skipped and theprocess goes directly to STEP 261.

In the test of the BD sensor, the laser is turned ON, and it isdetermined whether or not a perdetermined number of horizontalsynchronized signals have been outputted from the BD sensor within apredetermined time. If an error has occurred at the laser or polygonmirror, this test can not be carried out, and in such a case, the testis omitted.

In STEP 261, the initialization of the pattern generator is completed,and if the self test routine is then required in a remote routine, theprocess goes to the remote routine from STEP 262. Conversely, if theself-test routine is not requested in the remote routine, the processgoes to STEP 263, in which it is determined whether or not the self testroutine is requested in a printing sequence (STEP 034 in FIG. 8E. If theself-test routine is requested as in STEP 015 of FIG. 7, the processgoes from STEP 263 to STEP 264, in which the laser, the polygon mirrorand the main motor are stopped, and then the process returns to theroutine at which this sub-routine was requested. If the self-testroutine is requested in the printing sequence as a self test, theprocess skips STEP 264, and returns to the routine at which thissub-routine was requested.

Accordngly, when the self test is finished, it is determined whether ornot an error has been detected in the test, as in STEP 016 shown in FIG.7, and if an error has occurred, the process goes to the errorprocessing routine. If an error has not occurred, the printer is set toa print mode in STEP 017, a 360 seconds timer is started in STEP 018,and the process goes to "A" as shown in FIG. 8.

In STEPS 019 and 020, the A-IC determines whether or not a PAUSE signalor a STOP signal has been sent from the B-IC, respectively. If one ofthese signals has been sent, the print mode is cancelled in STEP 021.

If neither a PAUSE signal nor a STOP signal has been sent, the processgoes to STEP 022, in which it is determined whether or not the printmode has been set. If the print mode has not been set, STEP 023 iscarried out to set the print mode, and if the print mode has been set,STEP 023 is skipped. In STEP 024, it is determined whether or not aprinting process has started and print data for more than one page hasbeen transmitted from the host computer. If the printing process hasstarted, the process goes to the printing sequence described below.

In STEP 025, the 360 second timer, which provides a timing by which theheater is changed to the lower temperature setting, is stopped, and inSTEP 026, it is determined whether or not the heat roller is at a hightemperature necessary for the fixing. If the heater is set to a lowtemperature, a 120 second timer is started in STEP 027, and thetemperature of the heater is set to a high temperature in STEP 028. InSTEP 029, it is determined whether or not the temperature of the heateris a predetermined high value. If the temperature of the heater has notreached the predetermined high value in STEP 029, the process goes toSTEP 030, in which it is determined whether or not 120 seconds havepassed since STEP 027 was carried out. If 120 seconds have not passed,the process returns to STEP 029. Accordingly, if the temperature doesnot reach the predetermined high value within 120 seconds, the processgoes to STEP 031 in which a heater error bit is set, and the errorprocessing routine is then carried out.

In SSTEP 029, if the heat roller is set to the predetermined hightemperature, the timer is stopped in STEP 032 and a PRINT-UW bit is setin STEP 033. The process then goes to STEP 034, in which the self-testroutine shown in FIG. 16 is started from a terminal "SELF TEST 2". If anerror is detected in the self-test routine, in STEP 035, it is notedthat an error has been detected and thus the process goes to the errorprocessing routine. If an error is not detected in the self-testroutine, the process goes from STEP 035 to STEP 036, in which a biascontrol for the transfer unit 30 is started from the M bias.

After a form feeding correction is allowed in STEP 037, the processwaits until the D bias is turned ON in STEP 038. Then, in STEP 039, theBR motor is started and the press roller starts to move up, and in STEP040, a 2 second timer is started, whereby a process for moving the pressroller up is carried out as described later.

On the other hand, when a printing process is not allowed to be startedin STEPS 019, 020 or 024, then in STEP 042, if 360 seconds have passedsince STEP 018, STEP 043 is carried out and the heater is set to apredetermined low temperature. Then in STEPS 044 through 050, it isdetermined whether or not a test printing is carried out.

In STEP 044, it is determined whether or not a remote mode has been set,and in STEP 045, it is determined whether or not a test switch has beenturned ON. In STEP 046, it is determined whether or not a test mode hasbeen set, and if the remote mode has not been set and the test switchhas been turned ON, or the test mode has been set, the process goes toSTEP 047 and the self print mode is set. Then, in STEP 048, the printmode in which a usual print is carried out is cancelled, and in STEP049, the test mode is set and the process goes to STEP 025.

If the remote mode and the test mode have not been set, the self printmode is cancelled in STEP 050, and the process goes to STEP 051 in whichit is determined whether or not an FF request has been output. If the FFrequest has been outputted, the process goes from STEP 051 to an FFprocessing routine, and thus one page of the continuous form isdischarged. Conversely, if the FF request has not been output, in STEP052, it is determined whether or not a high temperature setting has beenrequested. If the high temperature setting has not been requested, theprocess returns to STEP 019, and the process so far is repeated.

As a result of starting the main routine to carry out the self test inSTEP 015 of FIG. 7, a request for a high temperature setting is carriedout in the self test. At the time when STEP 053 is carried out, however,due to an elapse of time, the condition may be transferred to a lowtemperature setting. Therefore, the heat roller 31 is set to a hightemperature in STEPS 054 through 057. Namely, a 120 second timer isstarted in STEP 054, and the temperature of the heater is set to a hightemperature in STEP 055. If the temperature of the heater has notreached the predetermined high temperature in STEP 056, STEP 057 iscarried out and it is determined whether or not 120 seconds have passed.If 120 seconds have not passed, STEP 056 is repeated. If the heater doesnot reach the predetermined high temperature within 120 seconds, aheater error bit is set in STEP 059 and the process goes to the errorprocessing routine. In STEP 056, if the heater has reached thepredetermined high temperature, the 120 second timer is stopped in STEP058 and the process goes to "C" in FIG. 7.

Therefore, until a signal denoting a start of the printing process isinput, the A-IC does not carry out the printing sequence by repeatingthe process shown at the left in FIGS. 8a through 8c.

The A-IC holds the heat roller at the predetermined high temperatureuntil 360 seconds have passed after the timer is set, and carries out aloop processing of STEPS 019 through 024 and STEPS 042 through 053.Then, if 360 seconds have passed, the temperature of the heater ischanged to a low temperature setting, and the process goes from STEP 052to STEP 019. When the process is carried out in this loop, the hightemperature setting is not requested, and if it is determined in STEP024 that a signal for a printing start has been input, or if it isdetermined in STEP 045 that the test switch is turned ON, the printingsequence starting at STEP 025 is carried out.

If the BRU signal is output first in STEP 041, the process goes to "B"in FIG. 9, and in STEP 060, it is determined whether or not theself-print mode has been set. If the self-print mode has not been set,in STEP 061, a request for an input of a horizontal synchronized signal(HS) is sent, i.e., a request is issued for the start of an exposureprocess. While the first BRU signal generated in STEP 041 is ON, inSTEPS 062 and 063, it is determined whether or not the HS has beeninput. If the HS is not input before the first BRU signal is turned OFF,the process goes from STEP 063 to STEP 064, in which it is againdetemined whether or not the HS is input. Then, in STEP 065, it isdetermined whether or not a second BRU signal has been turned ON. If theHS is not input before the second BRU signal is turned ON, the processgoes from STEP 065 to STEP 066.

Namely, if the HS is not output from the BD sensor before the pressroller has reached the upper position, it is deemed that an error hasoccurred in the optical system, and accordingly, the BR motor is stoppedin STEP 066, the press roller is moved down in STEP 067, and the processgoes to the error processing routine.

If the horizontal synchronized signal is input, the A-IC cancels the HSrequest in STEP 068, and proceeds to STEP 069.

On the other hand, if the self-print mode has been set, the process goesfrom STEP 060 to STEP 070, in which the pattern generator is started.Then a 2 second timer is started in STEP 071, the process waits untilthe generator is turned ON in STEP 072, and when the generator is turnedON, the process goes to STEP 069. In the process from STEP 070 to STEP072, the A-IC receives writting information from the generator withoutan HS request.

STEP 069 is provided for waiting for the BRU signal to be turned OFF,when the process goes from STEP 062 to STEP 068 without turning OFF theBRU signal. Namely, if the process goes from 064 to STEp 068 after theBRU signal is turned OFF in STEP 063, STEP 069 is substantially omitted.

If the second BRU signal is output before completion of the count of the2 second timer at STEP 040 in FIG. 8, the process goes from STEP 073 toSTEP 075, and the BRU motor is stopped. Conversely, if the second BRUsignal is not output before 2 seconds have passed, the process goes fromSTEP 074 to STEP 066, whereby the BR motor is stopped, the press rolleris moved down, and the error processing routine is carried out.

When the press motor is moved up so that the form is sandwiched betweenthe rollers, the F clutch is connected in STEP 076 and the rotation ofthe heat roller and the tractor is started.

A timing from an exposure to a start of feeding the continuous form iscarried out in accordance with a timing chart shown in FIG. 20.

In this drawing, the BR motor is started at the same time as the D biasis turned ON. During the first ON of the BRU signal, or before the BRUsignal is again turned ON after once being turned OFF, an exposure isstarted. Note that, on the sensitive drum, a space between a position atwhich an exposure is started and a position at which transfer to thecontinuous form is started is set to one and a half inches in thisembodiment. Therefore, before the exposed position reaches the transferposition, the drum must be allowed to run idle so that the continuousform is not fed by one and a half inches.

Note that, if the feeding of the continuous form is started at the sametime as a printing portion on the sensitive drum reaches the transferposition, the speed of the continuous form cannot reach a perdeterminedvalue (75mm/sec) in a short time, and thus a difference in the speed ofthe drum and the speed of the continuous form occurs, and as a result,the printed letters are deformed. To avoid this drawback, when the drumruns idle and reaches a position upstream by 1/6 inch before theexposure position of the drum reaches the transfer position, i.e., whenthe drum is run idle by one and one-third inches from the exposedposition, the press roller is returned to the pressing position tosandwich the continuous form with the heat roller, and the continuousform is brought into contact with the sensitive drum. At the same time,the F clutch is connected to start a feeding of the continuous form, andtherefore, a space of 1/6 inch from the perforated portion is notprinted.

The F clutch may be controlled to be connected in accordance with anelapse of time from a start of the exposure, so that the F clutch ONoperation is carried out after the BR motor is stopped.

When the feeding of the continuous form is started, a count of the PFSpulse that is outputted at every 1/2 inch feed of the continuous form isstarted. In STEPS 077 through 080 of FIG. 9, while taking into accountthe operation of the 2 second timer controlled in STEP 040 of FIG. 8 andthe issuance or non-issuance of a STOP signal from the B-IC, the processwaits for the counted number of PFS pulses to become more than 1. If thecounted number of PFS pulses is less than 1 in STEP 077, the processgoes to STEP 078 in which, if 2 seconds have passed from STEP 040 ofFIG. 8, the process goes to the error processing routine. In STEP 078,if 2 seconds have not passed from STEP 040 of FIG. 8, the process goesto STEP 079 in which, if the STOP signal is sent, the process goes tothe emergency stop routine. Conversely, if the STOP signal is not sent,the process returns to STEP 077. In STEP 077, if the counted number ofPFS pulses has become more than 1, the process goes to STEP 080, and the2 seconds timer is stopped.

Then, in STEP 081, if the counted number of PFS pulses is not equal to17, STEP 082 is carried out to determine whether or not the STOP signalhas been sent. If the STOP signal has been sent, the process goes to theemergency processing routine, but returns to STEP 081 if the STOP signalhas not been sent. Namely, in STEP 081, if the counted number of PFSpulses is equal to 17, the process goes to STEP 083.

In STEP 083, if the self-print mode is set, the pattern generator isstopped in STEP 084, and in STEP 085, it is determined whether or notthe generator has been stopped. If it is determined that the generatorhas not been stopped in STEP 085, in STEP 086, it is determined whetheror not the STOP signal has been input. If it is determined that thegenerator has been stopped in STEP 085, the process goes to STEP 087.

On the other hand, if it is determined in STEP 083 that the usual printmode has been set, the process goes to STEP 087, and it is determinedwhether or not the STOP signal has been sent. If the STOP signal has notbeen sent, in STEP 088 it is determined whether or not the PAUSE signalhas been sent from the B-IC. If the PAUSE signal has been sent, a PAUSEbit is set to "1" in STEP 089, and if the PAUSE signal has not beensent, STEP 089 is skipped. Then, in STEP 090, it is determined whetheror not the counted number of PFS pulses has reached 18. If this countednumber has not reached 18, the process returns to STEP 087. Conversely,if this counted number has reached 18, the process goes to STEP 091 inFIG. 10.

In STEPS 091 through 094 of FIG. 10, it is determined whether or not theprinting is underway. Namely, if it is determined in STEP 091 that thePAUSE request has been sent from the B-IC, or if it is determined inSTEP 092 that the self-print mode has not been set and it is determinedin STEP 094 that a signal denoting that a printing is underway has notbeen input, or it is determined in STEP 093 that the test switch has notbeen turned ON, the process goes to a stop processing routine shown inFIG. 17. Note that the signal determined in STEP 094 is output, forexample, when print data in a usual printing mode is less than an amountthereof corresponding to one page.

Accordingly, when the number of PFS pulses becomes 18, i.e., when thecontinuous form is fed by 9 inches, it is determined whether or not thenext page should be printed. This is because, as described above, sincethe exposure position and the transfer position are at differentlocations, when the transfer position is 9 inches from a perforatedportion, a portion corresponding to 10.5 inches from the perforatedportion is located at the exposure position.

The stop processing routine shown in FIG. 17 is described below.

In this stop processing routine, if it is determined in STEP 270 thatthe number of PFS pulses has reached 22, the F clutch is disconnected inSTEP 272, and the feeding of the continuous form is stopped. Then, inSTEP 273, it is determined whether or not a T bias voltage for atransfer has been turned OFF. In STEP 270, if it is determined that thenumber of PFS pulses has not reached 22, in STEP 271 it is determinedwhether or not the STOP signal has been sent. If the STOP signal hasbeen sent, the process goes to the emergency stop routine. Conversely,if the STOP signal has not been sent, the process returns to STEP 270.Similarly, in STEP 273, if it is determined that the T bias voltage hasnot been turned OFF, in STEP 274 it is determined whether or not theSTOP signal has been sent, and if the STOP signal has been sent, theemergency stop routine is carried out.

When this routine is carried out due to the issue of a PAUSE request,i.e., the pause bit is "1" in STEP 275, the process goes from STEP 275to STEP 276, in which it is determined whether or not an FF (form feed)request has been issued, and then STEPS 277 through 281 are carried outand a form discharge process is carried out. This process is describedlater.

Conversely, when this routine is carried out for a reason other than theissue of a PAUSE request, STEPS 277 through 281 are skipped and theprocess goes to STEP 282, in which the press roller is moved down. Thenif in STEP 283, it is determined that the PAUSE bit is not "1", thenSTEPS 284 and 285 are skipped, the laser is turned OFF in STEP 286, themain motor is stopped in STEP 287, a correction of the continuous formfeeding is prohibited in STEP 288, and the polygon mirror is stopped inSTEP 289. The process then branches off from STEP 290 to return to STEP017 of FIG. 7.

As understood from this flow chart, when the PAUSE request is not issuedand the printing is normally finished and the next printing awaited, onepage of continuous form, which has not been fixed, remains in theprinter. This is because, as the printer is a page printer in which acontinuous form is used, if all of the transferred part were fixed atevery stoppage of the printing process, the next page to the page whichhas been fixed would be fed without being transferred, and thus that onepage becomes useless.

Note that in the case in which the end of the continuous form isreached, even if the last page is fixed, since it is the last page, theuseless page of the continuous form as described above can not exist.Further, since the sprocket holes are engaged with projections of thetractor unit of the printer when a new continuous form is set therein,if the last page remains in the printer, the new continuous form cannotbe set to the printer. Still further, when the PAUSE request is issueddue to an error relating to a toner, if the printer is simply stopped,an unfixed page remains in the printer. Therefore, if the power supplyis cut at that stage, the printed result on the last page cannot beused.

Therefore, in the printer of this embodiment, when the stop processingroutine is carried out due to an issue of a PAUSE request, in theprocess of STEPS 276 through 281, the single page which has beentransferred is fixed and discharged from the printer, and the printer isthen stopped.

When the end of the continuous form is reached, the FF request is outputat the same time and the process goes from STEP 276 to STEP 277, inwhich the PFS counter is cleared and the F clutch is connected. Then, inSTEP 278, the continuous form is fed until the number of PFS pulsesreaches 28, and the F clutch is then disconnected in STEP 279.

In the case of a toner error, the FF request is not issued and theprocess goes from STEP 276 to STEP 280, in which the PFS counter iscleared and the F clutch is connected. Then, the continuous form is feduntil the number of PFS pulses reaches 22 in STEP 281, and the F clutchis disconnected in STEP 279.

Note that, although the length of one page of the continuous form is 11inches, and corresponds to 22 PFS pulses, when the end of the continuousform is reached, since the continuous form is separated from the tractorunit during the feeding, a speed of the tractor unit is lowered to 50mm/s, whereby the interval between two PFS pulses is lengthened.Therefore, taking a margin into consideration, the continuous form isfed until the number of PFS pulses reaches 28.

When one page of the continuous form is discharged from the printer, thepress roller is moved down in STEP 282, the print mode is cancelled inSTEP 284, the temperature of the heat roller is then set to a lowertemperature in STEP 285, and accordingly, the process goes to STEPS 286through 289 described above. In STEP 291, a PAUSE bit is cleared, and inSTEP 292, the process waits until the PAUSE request is cancelled, andthen goes to STEP 054 in FIG. 8.

Note that, when one page of the continuous form is discharged from theprinter due to an error of a toner, the page next to the discharged pageis not printed, and therefore, a blank page is discharged at the nextprinting. Therefore, the printer may be constructed in such a mannerthat symbols or letters denoting a toner low state or a toner overflowstate are printed on the blank page by an output from the patterngenerator, whereby, in the next printing, the kind of error that causedthe stoppage of the printer in the previous printing is recognized.

The description now returns to FIG. 10.

If the PAUSE request is not issued and the printing is continued, theprocess goes to STEP 095, in which it is determined whether or not theself-print mode has been set. If the self print mode has been set, STEP096 is skipped and the process goes to STEP 097, and if the usual printmode has been set, STEP 096 is carried out so that the HS request isissued.

The process of STEPS 097 through 102 is provided for setting the APC(automatic output control) of the laser during the feeding of thecontinuous form to the next page. The APC is started in STEP 097, and a20 ms seconds timer is started in STEP 098. Then in STEP 099 it isdetermined whether or not 20 ms has passed from the start of the timer,and in STEP 100 it is determined whether or not the STOP signal has beensent from the B-IC. If the STOP signal has been sent, the emergency stoproutine is carried out. If it is determined in STEP 098 that 20 ms haspassed, the 20 ms timer is stopped in STEP 101, and in STEP 102, it isdetermined whether or not the setting of the APC has been completed. Ifthe setting of the APC has not been completed, the error processingroutine is carried out.

If the setting of the APC has been completed, the process goes to STEP103, in which it is determined whether or not the self-print mode hasbeen set. If the self-print mode has been set, the pattern generator isagain started in STEP 104, and the Generator ON state is confirmed inSTEPS 105 and 106. That is, if it is determined in STEP 105 that thepattern generator has been started, the PFS is set to "-4" in STEP 107,and the process then returns to STEP 081 in FIG. 9, whereby the printingis carried out. If in STEP 105 it is determined that the generator hasnot been started, the process goes to STEP 106, in which, if it isdetermined that the STOP signal has not been input, the process returnsto STEP 105, Conversely, if it is determined that the STOP signal hasbeen input, the emergency stop routine is carried out.

In STEP 103, if it is determined that the usual print mode has been set,in STEPS 108 and 109 it is determined whether or not an exposure hasbeen started. If the exposure has been started, the process goes fromSTEP 108 to STEP 110, in which the HS request is cancelled, and theprocess goes to STEP 107.

The above completes the description of the main routine and thesubroutines branched off from the main routine. Now, two interruptprocessing routines carried out independently from the main routine willbe described.

FIG. 18 shows a timer interrupt routine carried out at every count ofthe control timer. This interrupt routine has the highest priority, andtherefore, when this routine is started, all other routines areprohibited.

When the motor ON bit is set to "0", the control timer is formed as a 1ms timer based on a 38.4 μs clock, which is the same as the controltimer start in STEP 002 of the main routine, so that the timer interruptis carried out at every 1 ms. In this case, the process goes from STEP300 to STEP 301, in which the control timer is stopped. The controltimer is then started within 1 ms in STEP 302, the interrupt prohibitionis cancelled in STEP 303, and the process returns to the routine atwhich this sub-routine was requested.

When the main motor start routine is carried out so that the motor ONbit is set to "1", the control timer is used for defining a pulse fordriving the main motor. In this case, the control timer outputs a pulsein accordance with a 1.2 μs clock signal, and thus the timer interruptis carried out at each input of this clock signal.

To ensure an accurate correction of the drive pulse of the main motor,the pulse is generated in accordance with the 1.2 μs clock signal. Toenable this pulse to be generated by using an 8 bit timer, one hardwaretimer is operated as 4 timers by software, and these 4 timers arecontinually operated so that a 1 ms pulse is defined.

When the main motor is just started, since the motor RDY bit is set to"0", the process goes from STEP 304 to STEP 305, in which it isdetermined whether or not the P count is less than 1. The P count is setto "159" in STEP 201 shown in FIG. 13, and when the main motor is juststarted, since the P count is about "159", the process goes from STEP305 to STEPS 306, 307, 308 and 309, in which the main motor is startedat a slow speed and gradually accelerated to a high speed.

The main motor used in this embodiment is self-accelerated to 300 rpm.To enable use of the main motor at a rotation speed of about 1000 rpm,during an increase from 300 rpm to 1000 rpm, a frequency of the drivepulse is exponentially changed within about 200 ms, so that the rotationspeed of the main motor is changed from a low speed to a high speed.

First, until STEP 306 is carried out by the number corresponding to theinitial value of the VALUE count set in STEP 202 shown in FIG. 13, STEPS307 and 308 are skipped, and the process goes to STEP 309, in which theVALUE count is set to the control timer to determine a frequency of thedrive pulse of the main motor. In STEP 310, phase data for operating themain motor is output, and the process goes to STEP 303 and thisinterrupt routine is ended.

This process is repeated, at the frequency set to the control timer,until the timer interrupt routine has been carried out for the number oftimes corresponding to the VALUE count. When the process is repeated forthe number of times corresponding to the VALUE count, STEP 307 iscarried out so that new data is set to the VALUE count. Then, in STEP308, the P count is decreased by "1", the new VALUE count is set to thecontrol timer in STEP 309, and new phase data is output in STEP 310.

The number of data needed for accelerating the motor from a slow speedto a high speed totals 160. Therefore, the above operation is repeateduntil the P count becomes less than "1" in STEP 305, whereby therotation speed of the main motor reaches a predetermined value.

When the P count becomes less than "1", the process goes from STEP 305to STEP 311, in which the motor RDY bit is set to "1". Then the controltimer is stopped in STEP 312, and is set to 262 μs in STEP 313 andrestarted. In STEP 314, a control timer Carry count for controlling thecontrol timer is set to "1". Then the process goes to STEPS 310 and 303and is ended. As a result, the next timer interrupt routine is carriedout after 262 μs.

Note that STEPS 311 through 314 are carried out once during a main motorstart routine.

The next interruption is carried out 262 μs after the previous process,and since the motor RDY bit has been set to "1" in STEP 311, the processgoes from STEP 304 to STEP 315, in which the condition of a controltimer END bit is determined. Initially, this bit is set to "0", andtherefore, the process goes to STEP 316 in which it is determinedwhether or not the control timer Carry has a borrow, i.e., whether ornot the control timer Carry is less than "0".

When STEP 316 is carried out for the first time, since the control timerCarry bit was set to "1" in STEP 314, STEPS 317 through 319 are skippedand STEP 320 is carried out to decrease the control timer Carry bit by1, and then the process returns to the routine at which this sub-routinewas requested.

Since the control timer remains set at 262 μs, after the motor RDY bitis set to "1" in STEP 311 in the previous procedure, the second and thethird interrupt routines are carried out at every 262 μs. When thesecond interrupt routine is carried out, a borrow occurs in the controltimer Carry in STEP 320, and thus in the third interrupt routine, theprocess goes from STEP 316 to STEP 317, in which the control timer Carryis set to "2". Then, in STEP 318, the value of the control timer ischanged to a value of a control timer count which is set in a PFSinterrupt routine described later. Note that the value of the controltimer count is obtained by multiplying the number of clock signals by1.2. In STEP 319, the control timer END bit is set to "1", and thenSTEPS 320 and 303 are carried out to end this process.

The control timer count is used for correcting a width of the drivepulse of the main motor, and the time until the next interrupt iscontrolled by the value of the control timer newly set in STEP 318.

Upon the next interrupt routine, since the result is affirmative in STEP315, the process goes to STEP 321, in which the control timer END bit iscleared. Then the control timer is stopped in STEP 322, is set to 262 μsagain in STEP 323, and the process passes through STEPS 310 and 303 toreturn to the routine at which this sub-routine was requested.

By repeatedly carrying out this process, four timers, i.e., three 262 μstimers and one timer defined by the control timer count, are formed, andthe phase data for the main motor is outputted at the times defined bythe four timers, whereby the drive pulse for the main motor isdetermined.

The PFS interrupt routine shown in FIG. 19 is described below. Thisinterrupt routine is started when the PFS pulse rises. In the PFSinterrupt routine, the control timer count by which a width of the drivepulse for the main motor is corrected is set by measuring a feedingspeed of the continuous form in accordance with the PFS signal, based ona horizontal synchronized signal output from the BD sensor.

In this routine, an interrupt other than the timer interrupt describedabove is prohibited in STEP 350, and in STEP 351, it is determinedwhether or not the F clutch is connected. Even if the main motor hasbeen driven, when the continuous form is not fed, the PFS pulses are notoutput, and therefore, no correction is needed. Therefore, in this case,an interrupt is allowed in STEP 352, and this routine is ended.

When the F clutch is connected, the process goes to STEP 353, in whichit is determined whether or not the PFS count is "1". The PFS count isset to "0" when a boundary between two pages comes to a positiondirectly under the sensitive drum, in the main routine, or in a tipposition set routine in which a tip of the continuous form is set to apredetermined position. The process goes to STEPS 354 and 355 when thePFS interrupt routine is carried out for the first time, so that a 1inch bit is cleared and a count for the BD signal is allowed.

Then, in STEP 356, the PFS count is increased by 1, and in STEP 357, itis determined whether or not a form feeding correction has been allowed.The form feeding is corrected to adjust a deviation of a printingposition and prevent deformation of the printed letters, and therefore,the correction is allowed between STEP 037 in FIG. 8 and STEP 288 inFIG. 17. When the tip position set routine is not carried out, even ifthe continuous form feeding is carried out, the amount of continuousform fed need not be corrected. Therefore, in this case, the correctionis not allowed.

When the correction is not allowed, the process goes from STEP 357 toSTEP 352 and is ended. Conversely, when the correction is allowed, inSTEP 358 it is determined whether or not the 1 inch bit has been set to"1". Although the PFS pulse is generated at every 1/2 inch of formfeeding, since in this printer the form feeding correction is carriedout at every 1 inch of form feeding, the content of the 1 inch bit ischanged in STEPS 359 and 360, and thus it is determined whether or notthe PFS pulse denotes an inch of an integer number.

When the inch is an integer number, the number of BD pulsescorresponding to 1 inch is set to an HSYNC count in STEP 361, and the BDcounter is then cleared in STEP 362. Then, in STEP 363, it is determinedwhat resolving power of the printer has been set, so that a correctioncorresponding to the resolving power DPI (the number of scanning linesper inch) is carried out.

In this correction, it is assumed that output of the BD pulses isaccurate, and it is assumed that the initial value of the controlcounter has been set to 178 (corresponding to about 214 μs), forexample, when the form feeding is allowed.

First, in STEPS 364 and 369 it is determined whether or not the HSYNCcount coincides with the number of the resolving power set at that time.If the HSYNC count coincides with that number, this means that the formfeeding is being carried out correctly, and thus the control timer countis not changed and the process is ended.

Conversely, if the HSYNC count does not coincide with that number, inSTEPS 365 and 370, it is determined whether or not the HSYNC count islarger than a predetermined value. If the HSYNC count is lower than thepredetermined value, this means that the form feeding speed is higherthan the laser scanning speed. Therefore, the control timer count isincreased by 1 in STEP 366, and thus a frequency of the drive pulse forthe main motor is lowered. Conversely, if the HSYNC count is larger thanthe predetermined value, this means that the form feeding speed is lowerthan the laser scanning speed. Therefore, the control timer count isdecreased by 1 in STEP 371, and thus a frequency of the drive pulse forthe main motor is raised.

Note that STEPS 366, 368, 372 and 373 are provided for defining theupper and lower limits of the control timer, and due to these STEPS, acorrection range for the control timer is set to 214 μs±20 μs. Namely,as shown above, a speed of the main motor is changed to correct a speedof the form feeding.

FIG. 21 shows a timer 80 constructed in the A-IC. The timer has an 8 bitcounter 81 corresponding to the control timer described with referenceto FIG. 18, an 8 bit register 82, and a comparator 83. A clock signalgenerated by the clock generating circuit provided in the A-IC isinputted to the 8 bit counter 81 every 1.2 μs, whereby the content ofthe counter 81 is increased by 1 every 1.2 μs. The register 82 stores anumber corresponding to a constant time or a variable time. The contentsof the counter 81 and the register 82 are input to the comparator 83,which outputs a signal "INT" denoting a count of the timer 80 when thecontent of the counter 81 becomes equal to the content of the register82, so that the timer interrupt routine shown in FIG. 18 is carried out.

In this embodiment, the 8 bit register 82 stores "218", which is aconstant value and corresponds to the constant time, i.e., 262 μs, inthe first, second and third counting operations of the timer 80.Therefore, the timer 80 counts the 1.2 μs pulses to "218", three times.Further, the 8 bit register 82 stores a number between "162" and "195",which is a variable value and corresponds to the variable time, i.e., atime of 214 μs±20 μs, in the fourth counting operation of the timer 80.This variable value is varied in accordance with an interval between thePFS pulses, which corresponds to a form feeding speed.

Thus, a width of the drive pulse for the main motor is determined bysumming up a time obtained by multiplying the constant time by three andadding the variable time, whereby a speed of the main motor is adjustedto a required value.

FIG. 22 shows the PFS pulses and HSYNC pulses. The PFS pulses aregenerated in accordance with a form feeding speed, and therefore, theinterval between two PFS pulses varies in accordance with a change ofthe feeding speed due to, for example, an expansion of the form. TheHSYNC pulses are generated by the scanning optical system at a constantinterval, and therefore, the number of the HSYNC pulses between two PFSpulses is changed in accordance with the form feeding speed, so that thecontent of the control timer counter is changed in STEP 366 or 371 inFIG. 19, and the content of the 8 bits register 82 is changed in STEP318 in FIG. 18, and as a result, the variable time is changed so thatthe width of the drive pulse is changed.

Note that, since the correction is carried out by one count(corresponding to 1.2 μs) for 1 inch as described above, the correctionis carried out with a very small unit to a standard width of the drivepulse.

Therefore, for example, when there is a 10 pulse error at the resolvingpower DPI, the correction is completed by feeding the form by 10 inches.Namely, the feeding speed is gradually adjusted to a required value. Thecorrection is carried out at every one count because, if the correctionis carried out by a plurality of counts at the same time, the feedingspeed would be abruptly changed and deformation of the printed letterscould occur.

Although the embodiments of the present invention have been describedherein with reference to the accompanying drawings, obviously manymodifications and changes may be made by those skilled in this artwithout departing from the scope of the invention.

We claim:
 1. A self-diagnosis device for a printer, comprising:aplurality of functional mechanisms provided in said printer, each ofsaid functional mechanisms performing a predetermined function; meansfor testing said functional mechanisms; means for detecting a testresult obtained by said testing means; means for controlling saidtesting means to test predetermined functional mechanisms, saidcontrolling means operating to test at least some of said predeterminedfunctional mechanisms regardless of the test result obtained for apreviously tested functional mechanism controlling means operating saidtesting means to carry out said test for predetermined functionalmechanisms regardless of results of tests of other functionalmechanisms; and means for storing each test result for said functionalmechanisms.
 2. A self-diagnosis device according to claim 1, whereinsaid testing means comprises a plurality of testing means for each ofsaid functional mechanisms.
 3. A self-diagnosis device according toclaim 1, wherein said detecting means comprises a plurality of detectingmeans for each of said functional mechanisms.
 4. A self-diagnosis deviceaccording to claim 1, wherein said testing means tests an operation ofsaid functional mechanisms by determining whether a predetermined stateof said functional mechanisms is attained within a predetermined time.5. A self-diagnosis device according to claim 4, wherein one of saidfunctional mechanisms comprises a heater, and said testing means testsan operation of said heater by determining whether said heater attains apredetermined temperature within a predetermined period of time.
 6. Aself-diagnosis device according to claim 4, wherein one of saidfunctional mechanisms comprises a polygon mirror provided in a scanningsystem for forming an electrostatic latent image on a photosensitivedrum, and said testing means tests an operation of said polygon mirrorby determining whether said polygon mirror attains a predeterminednumber of rotations within a predetermined period of time.
 7. Aself-diagnosis device according to claim 1, wherein said testing meanstests an operation of said functional mechanisms by determining whethera predetermined operation is carried out within a predetermined periodof time.
 8. A self-diagnosis device according to claim 7, wherein one ofsaid functional mechanisms comprises a motor for moving a member up anddown, and said testing means tests an operation of said motor bydetermining whether said member is moved up and down within apredetermined period of time.
 9. A self-diagnosis device according toclaim 7, wherein one of said functional mechanisms comprises a BD sensorthat outputs a horizontal synchronizing signal of a scanning system forforming an electrostatic latent image on a sensitive drum, and saidtesting means tests an operation of said BD sensor by determiningwhether said BD sensor outputs said horizontal synchronizing signalwithin a predetermined period of time after a laser is turned ON.
 10. Aself-diagnosis device according to claim 1, wherein said testing meanstests an operation of said functional mechanisms by determining whethera signal that is inputted to said functional mechanism is changed inaccordance with a change of a signal that is output from said functionalmechanism.
 11. A self-diagnosis device according to claim 10, whereinone of said functional mechanisms includes a laser provided in ascanning system for forming an electrostatic latent image on aphotosensitive drum.
 12. A self-diagnosis device according to claim 1,wherein said controlling means operates said testing means to carry outsaid tests for all of said functional mechanisms which can be tested.13. A self-diagnosis device according to claim 1, wherein saidself-diagnosis device is provided in a microcomputer, and said storingmeans sets an error bit of a register included in said microcomputerwhen said test result shows an error, said error bit being provided foreach of said functional mechanisms.
 14. A self-diagnosis device for aprinter having a plurality of function mechanisms, in which each of saidfunctional mechanisms carry out a predetermined function for saidprinter, comprising:means for testing a condition of said functionalmechanisms and storing a result of each test thereof; and means forcontrolling said testing means to test each functional mechanism one byone, said controlling means testing predetermined functional mechanismseven if said testing means has detected an error in a previously testedfunctional mechanism.
 15. A self-diagnosis device for a printer,comprising:a plurality of functional mechanisms provided in saidprinter, each of said functional mechanisms performing a predeterminedfunction; means for testing an operating condition of said functionalmechanisms; and means for controlling said testing means so as tocontinue testing predetermined functional mechanisms regardless of atest result obtained for a previously tested functional mechanism. 16.The self-diagnosis device of claim 15, wherein said testing meanscomprises a plurality of testing means for each of said functionalmechanisms.
 17. The self-diagnosis device of claim 15, wherein saidtesting means determines whether a predefined operation of eachfunctional mechanism is carried out within a predetermined period oftime.
 18. A self-diagnosis device for a printer having a plurality offunctional mechanisms, each functional mechanism performing apredetermined operation, comprising:means for analyzing a signalproduced by said functional mechanisms so as to determine whether saidfunctional mechanisms are satisfactorily operating; means for setting anerror code that represents which one of said plurality of functionalmechanisms are not satisfactorily operating; and means for controllingsaid analyzing means to continue analyzing said signals produced bypredetermined functional mechanisms, even though a previously testedfunctional mechanism is determined to not be satisfactorily operating,so that an error code is set for all functional mechanisms that are notsatisfactorily operating.
 19. The self-diagnosis device of claim 18,wherein said functional mechanisms are determined to be operatingsatisfactorily if said predetermined operations of said functionalmechanisms are performed within a predetermined period of time.
 20. Theself-diagnosis device of claim 18, wherein said error code sets an errorcode register in a microcomputer.